/*
 * Company  : Datalogic S.p.A.
 * Title    : LIBRARY ACQUISITION CONSTANTS
 * Filename : ACQK.INC
 * System   : Keil-Frankling C-Language Compiler
 * MemoryMod: large
 * Notes    :
 */


/* acquisition check : values taken up by dec_hr_msg.datatype */

#define ACQALLPR    0 /* any printable data item  20H-7EH */
#define ACQALPHA    1 /* alphabetical without punctuation 'A'-'Z' 'a'-'z' */
#define ACQALNUM    2 /* alphanumerical without punctuation 'A'-'Z' 'a'-'z' + '0'-'9' */
#define ACQNUMER    3 /* integer '0'-'9' */
#define ACQNUMDC    4 /* decimal '0'-'9' '.' */
#define ACQHEXDC    5 /* hexadecimal '0' - '9' 'A'-'F' 'a'-'f' */
#define ACQBOOLN    6 /* characters only "0" o "1" */
#define ACQ128CH    7 /* all 128 ASCII characters: 0H-7FH */
#define ACQ256CH    8 /* all 256 ASCII characters: 0H-FFH */
#define ACQALLPRNEW 9 /* any printable data item  20H-FFH */
#define ACQDTMAX    9 /* datatype max */


/*
 * DECODER HANDLER REQUEST COSTANTS
 *
 * dec_hreqst() procedure-programmable MODE directives
 *
 * Below is a list of programmable aquisition modes (XXX_hr_msg.acqmode)
 *
 */

#define MACQDEFAUL  0X00 /* keypad single character acquisition unacceptable */
                         /* standard codes allowed */
			 /* keypad procedure code acquisition unacceptable */
#define MACQSNGLCH  0X01 /* keypad single character acquisition acceptable ($10 - $99) */
#define MACQSNGLCHALL 0X02 /* all keypad single character acquisition acceptable ($0 - $255) */
#define MACQPROCED  0X04 /* keypad procedure code acquisition with function-related invocation */
#define MACQKPONLY  0X08 /* standard codes acquisition unacceptable */

#define MACQSCANOPP 0X60 /* it actives the decoder with scan opposite (falling-edge) . */
/* only for 725 */
#define MACQLNSCANOPP 0X70 /* it actives the long range decoder with scan opposite (falling-edge) . */
#define MACQLN0250  0X10 /* long range laser mode . You take aim in 250ms.  */
#define MACQLN0500  0X20 /* long range laser mode . You take aim in 500ms.  */
#define MACQLN1000  0X30 /* long range laser mode . You take aim in 1000ms. */
#define MACQLN1500  0X40 /* long range laser mode . You take aim in 1500ms. */
#define MACQLN2000  0X50 /* long range laser mode . You take aim in 2000ms. */

/* only for Marco Polo and F7344K ( special terminals ) */
#define MACQCSCAN   0X80 /* enable code reader with c key as scan key, if decoder handler is active */


/*
 * KEYBOARD HANDLER REQUEST COSTANTS
 *
 * kb_hreqst() procedure-programmable MODE directives
 *
 * Below is a list of programmable aquisition modes (kb_hreqst_msg.acqmode)
 *
 */

#define MACQAUTORP  0X01 /* enable autorepeat feacture on consol & arrow sections */
#define MACQONENTR  0X02 /* enable activation pushbuttons (SCAN) as keyboard ENTER key */
#define MACQCAPSMA  0X04 /* enable with double shift to acquire capital and small letter */
#define MACQSTNDON  0X08 /* disable activation pushbuttons (SCAN) as extension mode: 
                          * SCAN key as keyboard ENTER key in section SECTCONSOL ( without MACQONENTR );
                          * SCAN key as selection of UP and DOWN or LEFT and RIGHT arrows key in section SECTARROWS;
                          * SCAN key as keyboard F1 key in section SECTFUNCTN;
                          */

/*
 * bar code identifier returned in dec_answer.symblg by handler after reading
 */

#define ISY_NOTSET             0X00        /* identifier not set*/
#define ISY_MAN_INSRT          0XF0        /* manual insert */

#define ISY_39STD              0X10        /* standard 3/9 */
#define ISY_39EXT              0X11        /* extended 3/9 */
#define ISY_PHARMACTLI         0X12        /* Italian pharmaceutical  */
#define ISY_PHARMACTLF         0X13        /* French pharmaceutical  */
#define ISY_PHARMACTLE         0X14        /* not used */

#define ISY_INT25              0X20        /* interleaved 2/5 */
#define ISY_ITF14              0X21        /* itf14 idw */
#define ISY_ITF14STD           0X22        /* itf14 std */

#define ISY_IND25              0X30        /* industrial 2/5 */

#define ISY_MATRIX25           0X40        /* matrix 2/5 */
#define ISY_C11MATRIX25        0X41        /* code11 matrix 2/5 */

#define ISY_MONARCH            0X50        /* monarch  */
#define ISY_NW7                ISY_MONARCH /* nw7 */
#define ISY_PAKO               ISY_MONARCH /* pako */

#define ISY_DAIBM              0X60        /* delta a ibm */

#define ISY_MSI                0X70        /* msi */

#define ISY_CODE128            0X80        /* CODE128 */
#define ISY_CODEEAN128         0X81        /* EAN128 */

#define ISY_CODE93             0X90        /* code 93 */
#define ISY_CODE93EXT          0X91        /* code 93 extended */

#define ISY_ZELLWEGER          0XE8        /* zellweger */

#define ISY_STECH              0XE9        /* s-tech */

#define ISY_UPCE               0XA0        /* upc e sys0 */
#define ISY_UPCE2D             0XA1        /* upc e sys0 + 2 digit */
#define ISY_UPCE5D             0XA2        /* upc e sys0 + 5 digit */
#define ISY_UPCESYS1           0XA8        /* upc e sys1 */
#define ISY_UPCESYS1_2D        0XA9        /* upc e sys1 + 2 digit */
#define ISY_UPCESYS1_5D        0XAA        /* upc e sys1 + 5 digit */
#define ISY_UPCA               0XB0        /* upc a (stnd 12 digits) */
#define ISY_UPCA2D             0XB1        /* upc a + 2 digit */
#define ISY_UPCA5D             0XB2        /* upc a + 5 digit */
#define ISY_UPCA13C            0XB8        /* upc a (13 digits) */
#define ISY_UPCA13C2D          0XB9        /* upc a (13 digits) + 2 digit */
#define ISY_UPCA13C5D          0XBA        /* upc a (13 digits) + 5 digit */
#define ISY_UPCB               0XC0        /* upc b */
#define ISY_UPCB2D             0XC1        /* upc b */
#define ISY_UPCB5D             0XC2        /* upc b */
#define ISY_EAN8               0XD0        /* ean 8 */
#define ISY_EAN82D             0XD1        /* ean 8 + 2 digit */
#define ISY_EAN85D             0XD2        /* ean 8 + 5 digit */
#define ISY_EAN13              0XE0        /* ean 13 */
#define ISY_EAN132D            0XE1        /* ean 13 + 2 digit */
#define ISY_EAN135D            0XE2        /* ean 13 + 5 digit */
#define ISY_RSS14              0XE3        /* RSS 14 */
#define ISY_RSSLIMITED         0XE4        /* RSS Limited */
#define ISY_RSSEXPANDED        0XE5        /* RSS Expanded */
#define ISY_GS1_DATABAR_OMNIDIR         ISY_RSS14             /* GS1 Databar Omnidirectional */
#define ISY_GS1_DATABAR_LIMITED         ISY_RSSLIMITED        /* GS1 Databar  Limited */
#define ISY_GS1_DATABAR_EXPANDED        ISY_RSSEXPANDED       /* GS1 Databar  Expanded */


/*
 * SERIAL COMMUNICATION HANDLERS
 *
 */

/*
 * tx_hreqst(), rx_hreqst(), tx1_hreqst(), rx1_hreqst() procedure-programmable MODE directives
 *
 * Below is a list of programmable aquisition modes (tx_hr_msg.protc & rx_hr_msg.protc)
 *
 */

#define PROTDEFAUL  0X00 /* default protocol (RS232) */
#define PROT_RS485  0X01 /* RS485 protocol */
#define PROTXONOFF  0X02 /* Xon Xoff handling (only for tx1_hreqst() ) */
#define PROTNOXINI  0X04 /* no Xon Xoff status initialization from previous tx1_hreqst() */

/*
 * HDLCOM00 & HDLCOM10 RX HANDLERS ANSWER MESSAGE ERROR CODES (rx_answer.errorc)
 */

#define NoError         0 	/* FOR TX HANDLER ANSWER (tx_answer.errorc) too */
#define DrvLevPartyErr  1
#define RxDataBOvrflw   2
#define RxDataErr       3
#define RxTimeOut       4
#define TxTimeOut       5
#define RetriesExceeded 6

/*
 * HDLCOM10 HANDLER reception Bytes for the flow control in Xon/Xoff transmission mode
 */

#define XOn             0x11
#define XOff            0x13

/*
 * HDLCOM20 TX & RX HANDLERS ANSWER MESSAGE ERROR CODES ( getcomerr() )
 */

#define RX_VECTOR       0X01
#define RX_HABORT       0X02
#define RX_PARITY_ERROR 0X04
#define TX_VECTOR       0X08
#define TX_HABORT       0X10


/*
 * COMMON HANDLER ANSWER CONSTANTS
 */

/* value taken up by  .stat */

#define ACQDIS      'D' /* acquisition DISable */
#define ACQEND      'E' /* acquisition cycle complete */
#define ACQBEG      'B' /* acquisition cycle BEGun but incomplete */
#define ACQACT      'A' /* acquisition cycle ACTive at driver level (ir) */
#define ACQCON      'C' /* acquisition cycle CONnected at driver level (ir) */
#define ACQNOV      'N' /* formally invalid data */

/* only for Marco Polo and F7344K (special terminals) */
#define ACQENDCSCAN 'L' /* acquisition cycle complete with CLR KEY */


/*
 * bar code type-setting identifier to pass to procedure
 * symblg(), symblychcksm()
 */

#define SY_39STD               1          /* standard 3 of 9 family */
#define SY_EXTENDED39          2          /* 3/9 ext  */
#define SY_PHRMCTLI            3          /* Italian pharmaceutical */
#define SY_PHRMCTLF            4          /* French pharmaceutical */

#define SY_INT25               5          /* interleaved 2 of 5 family */
#define SY_ITF14	       6          /* itf14 idw */
#define SY_ITF14STD	       30         /* itf14 std */

#define SY_IND25               7          /* industrial 2/5 family */

#define SY_MATRIX25            8          /* matrix 2/5 family (MATRIX2/5,Code11 MATRIX2/5) */

#define SY_MONARCH	       9          /* monarch ( 2 of 7 ) family */
#define SY_NW7  	       SY_MONARCH /* nw7 */
#define SY_PAKO                10	  /* pako */

#define SY_DAIBM               11         /* delta a ibm family */

#define SY_MSI                 12         /* msi family */

#define SY_CODE128             13         /* code 128 family (CODE128 e EAN128) */
#define SY_CODEEAN128          27         /* code EAN128 */

#define SY_CODE93              14         /* code 93 family */

#define SY_ZELLWEGER           25         /* zellweger family */

#define SY_STECH               26         /* stech */

#define SY_UPC_EAN	       15         /* UPC/EAN family */
#define SY_UPC_ONLY 	       16         /* UPC only  */
#define SY_UPCA_EAN13          17         /* UPCA/EAN13 only */
#define SY_EAN8_ONLY           18         /* ean-8 only */
#define SY_UPCE_ONLY           19         /* upc-e only */
#define SY_UPC_EAN_2D	       20         /* UPC/EAN +2 without +5 */
#define SY_UPC_EAN_5D	       21         /* UPC/EAN +5 without +2 */
#define SY_UPCACH13	       22         /* UPCA trasmitted with 0 initial (13ch) */
#define SY_UPCB  	       23         /* enable UPC/B recognition */
#define SY_UPCE0SUP	       24         /* UPC/E code with zero suppressed without first and chksum ch. (6 ch) */
#define SY_UPCE0SUPCH8	       28         /* UPC/E code with zero suppressed with first and chksum ch. (8 ch) */
#define SY_UPCESYS1	       29         /* UPC/E code with SYS1 code type */

#define SY_CODE11_NOCHECK      31
#define SY_CODE11_C_CHECK      32
#define SY_CODE11_K_CHECK      33
#define SY_CODE11_CK_CHECK     34

#define SY_PLESSEY_NOCHECK      35
#define SY_PLESSEY_CHECK        36

#define SY_NOR25               37          /* 5B 2/5 family */

#define SY_RSS_14				38		
#define SY_RSS_LIM				39		
#define SY_RSS_EXP				40      
#define SY_GS1_DATABAR_OMNIDIR  SY_RSS_14
#define SY_GS1_DATABAR_LIMITED  SY_RSS_LIM
#define SY_GS1_DATABAR_EXPANDED SY_RSS_EXP

#define SY_ENH_START_ID         50   //leave a gap from 40 to 50 
#define SY_ENH_INT25_2_14         		(SY_ENH_START_ID+0)
#define SY_ENH_INT25_SENDCHK      		(SY_ENH_START_ID+1)
#define SY_ENH_39STD_SENDCHECK    		(SY_ENH_START_ID+2)
#define SY_ENH_PHARMA_SENDCHECK   		(SY_ENH_START_ID+4) 
#define SY_ENH_CODA_SENDSTART     		(SY_ENH_START_ID+5) 
#define SY_ENH_UPCA_SEND_SYS    		(SY_ENH_START_ID+6)
#define SY_ENH_UPCA_SEND_CHECK    		(SY_ENH_START_ID+7)
#define SY_ENH_UPCA_USE_SYS1      		(SY_ENH_START_ID+8)
#define SY_ENH_UPCE2A             		(SY_ENH_START_ID+9)
#define SY_ENH_UPCE_SEND_SYS 	  		(SY_ENH_START_ID+10)
#define SY_ENH_EAN8 					(SY_ENH_START_ID+11)
#define SY_ENH_EAN13 					(SY_ENH_START_ID+12)
#define SY_ENH_EAN_SEND_CHECK 			(SY_ENH_START_ID+13)
#define SY_ENH_UPC_EAN_2D 				(SY_ENH_START_ID+14)
#define SY_ENH_UPC_EAN_5D 				(SY_ENH_START_ID+15)
#define SY_ENH_UPC_EAN_EXTENSION_ONLY 	(SY_ENH_START_ID+16)
#define SY_ENH_PHARMA_SENDPREFIX		(SY_ENH_START_ID+17)
#define SY_ENH_UPCA_TO_EAN13			(SY_ENH_START_ID+18)
#define SY_ENH_UPCA_USE_SYS0			(SY_ENH_START_ID+19)
#define SY_ENH_UPCE_SEND_CHECK			(SY_ENH_START_ID+20)
#define SY_ENH_UPC_EAN					(SY_ENH_START_ID+21)
#define SY_ENH_EAN_TO_ISBN				(SY_ENH_START_ID+22)
#define SY_ENH_CODE128				    (SY_ENH_START_ID+23)
#define SY_ENH_CODEEAN128				(SY_ENH_START_ID+24)
#define SY_ENH_INT25    				(SY_ENH_START_ID+25)


#define SY_DEFAULT             SY_39STD
#define SY_MAX                 SY_NOR25

#define SY_ENABLE              1
#define SY_DISBLE              0

/*
 * Below is a list of keyboard's programmable sections (kb_hr_msg.section)
 */

#define SECTDEFAUL  0X00 /* disable ALL keyboard sections */
#define SECTCONSOL  0X01 /* enable keyboard CONSOLE section */
#define SECTFUNCTN  0X02 /* enable keyboard FUNCTIONAL (F1-F4-ESC) section */
#define SECTARROWS  0X04 /* enable keyboard ARROWS section */
#define SECTSENDIR  0X08 /* enable keyboard SEND IR KEY section. SEND for F660 and SHIFT + ESC for other terminals */
#define SECTONKEYS  0X10 /* enable activation pushbuttons (ONKEY) section */


/*
 * kb_hactiv_consol() function parameters
 */

#define MULTIPLE0          1
#define MULTIPLE1          2
#define MULTIPLE2          3
#define MULTIPLE3          4
#define MULTIPLE4          15
#define ENTER              5
#define BACKSPACE          6
#define SHIFT              7
#define ENDSHIFTIMER       8
#define SHIFTSTATUS        9
#define ENDSHIFTSTATUS     10
#define ERROR              11
#define DOUBLESHIFT        12   /* returned in alphanumeric terminal */
#define ENDDOUBLESHIFT     13   /* returned in alphanumeric terminal */
#define STANDARD           14   /* returned in alphanumeric terminal */


/*
 * kb_hactiv_arrows() function parameters
 */

#define UP               7
#define DWN              8
#define LFT              5
#define RGT              6
#define UPDWNARROWS      0  // arrow type selected returned in 630 terminal.
#define LFTRGTARROWS     1  // arrow type selected returned in 630 terminal.


/*
 * kb_hactiv_functn() & kb_hactiv_sfnctn() function parameters
 */

#define F1               1
#define F2               2
#define F3               3
#define F4               4
#define ESC              9
#define SEND             9  // returned in 660 terminal.
#define UPANDDWN	 9  // returned in 630 terminal.
#define CLR              9  // returned in MP and 7344K (special terminals).
#define SCAN             10 // returned in MP and 7344K (special terminals).

/*
 * INFRARED COMMUNICATION HANDLER
 *
 * Below is a list of programmable aquisition modes (ir_hr_msg.protc)
 */

#define PROTNOSEND  0X01

/*
 * IR HANDLER ANSWER MESSAGE EVENT (.event)
 */

#define TX_END          1
#define RX_END          2
#define TXRX_END        3





